home *** CD-ROM | disk | FTP | other *** search
/ HAKERIS 11 / HAKERIS 11.ISO / linux / system / LinuxConsole 0.4 / linuxconsole0.4install-en.iso / guile0.4.lcm / share / guile / slib / mklibcat.scm < prev    next >
Encoding:
Text File  |  2004-01-06  |  6.1 KB  |  192 lines

  1. ;"mklibcat.scm" Build catalog for SLIB
  2. ;Copyright (C) 1997 Aubrey Jaffer
  3. ;
  4. ;Permission to copy this software, to redistribute it, and to use it
  5. ;for any purpose is granted, subject to the following restrictions and
  6. ;understandings.
  7. ;
  8. ;1.  Any copy made of this software must include this copyright notice
  9. ;in full.
  10. ;
  11. ;2.  I have made no warrantee or representation that the operation of
  12. ;this software will be error-free, and I am under no obligation to
  13. ;provide any services, by way of maintenance, update, or otherwise.
  14. ;
  15. ;3.  In conjunction with products arising from the use of this
  16. ;material, there shall be no use of my name in any advertising,
  17. ;promotional, or sales literature without prior written consent in
  18. ;each case.
  19.  
  20. (call-with-output-file (in-vicinity (implementation-vicinity) "slibcat")
  21.   (lambda (op)
  22.     (display ";\"slibcat\" SLIB catalog for " op)
  23.     (display (scheme-implementation-type) op)
  24.     (display (scheme-implementation-version) op)
  25.     (display ".        -*-scheme-*-" op) (newline op)
  26.     (display ";" op) (newline op)
  27.     (display "; DO NOT EDIT THIS FILE -- it is automagically generated" op)
  28.     (newline op) (newline op)
  29.  
  30.     (display "(" op) (newline op)
  31.     (for-each
  32.      (lambda (asp) (display " " op) (write asp op) (newline op))
  33.      (append
  34.       (list (cons 'schelog
  35.           (in-vicinity (sub-vicinity (library-vicinity) "schelog")
  36.                    "schelog"))
  37.         (cons 'portable-scheme-debugger
  38.           (in-vicinity (sub-vicinity (library-vicinity) "psd")
  39.                    "psd-slib"))
  40.         (cons 'jfilter
  41.           (in-vicinity (sub-vicinity (library-vicinity) "jfilter")
  42.                    "jfilter")))
  43.       (map (lambda (p)
  44.          (if (symbol? (cdr p)) p
  45.          (cons
  46.           (car p)
  47.           (if (pair? (cdr p))
  48.               (cons
  49.                (cadr p)
  50.                (in-vicinity (library-vicinity) (cddr p)))
  51.               (in-vicinity (library-vicinity) (cdr p))))))
  52.        '(
  53.          (rev4-optional-procedures    .    "sc4opt")
  54.          (rev2-procedures        .    "sc2")
  55.          (multiarg/and-        .    "mularg")
  56.          (multiarg-apply        .    "mulapply")
  57.          (rationalize        .    "ratize")
  58.          (transcript        .    "trnscrpt")
  59.          (with-file            .    "withfile")
  60.          (dynamic-wind        .    "dynwind")
  61.          (dynamic            .    "dynamic")
  62.          (fluid-let        defmacro    .    "fluidlet")
  63.          (alist            .    "alist")
  64.          (hash            .    "hash")
  65.          (sierpinski        .    "sierpinski")
  66.          (soundex            .    "soundex")
  67.          (hash-table        .    "hashtab")
  68.          (logical            .    "logical")
  69.          (random            .    "random")
  70.          (random-inexact        .    "randinex")
  71.          (modular            .    "modular")
  72.          (factor            .    "factor")
  73.          (primes            .    factor)
  74.          (charplot            .    "charplot")
  75.          (sort            .    "sort")
  76.          (tsort            .    topological-sort)
  77.          (topological-sort        .    "tsort")
  78.          (common-list-functions    .    "comlist")
  79.          (tree            .    "tree")
  80.          (format            .    "format")
  81.          (generic-write        .    "genwrite")
  82.          (pretty-print        .    "pp")
  83.          (pprint-file        .    "ppfile")
  84.          (object->string        .    "obj2str")
  85.          (string-case        .    "strcase")
  86.          (stdio            .    "stdio")
  87.          (printf            .    "printf")
  88.          (scanf            .    "scanf")
  89.          (line-i/o            .    "lineio")
  90.          (string-port        .    "strport")
  91.          (getopt            .    "getopt")
  92.          (debug            .    "debug")
  93.          (qp            .    "qp")
  94.          (break    defmacro    .    "break")
  95.          (trace    defmacro    .    "trace")
  96.          (eval            .    "eval")
  97.          (record            .    "record")
  98.          (promise            .    "promise")
  99.          (synchk            .    "synchk")
  100.          (defmacroexpand        .    "defmacex")
  101.          (macro-by-example    defmacro    .    "mbe")
  102.          (syntax-case        .    "scainit")
  103.          (syntactic-closures    .    "scmacro")
  104.          (macros-that-work        .    "macwork")
  105.          (macro            .    macro-by-example)
  106.          (object            .    "object")
  107.          (yasos        macro    .    "yasyn")
  108.          (oop            .    yasos)
  109.          (collect        macro    .    "collect")
  110.          (struct    defmacro    .    "struct")
  111.          (structure    syntax-case    .    "structure")
  112.          (values            .    "values")
  113.          (queue            .    "queue")
  114.          (priority-queue        .    "priorque")
  115.          (array            .    "array")
  116.          (array-for-each        .    "arraymap")
  117.          (repl            .    "repl")
  118.          (process            .    "process")
  119.          (chapter-order        .    "chap")
  120.          (posix-time        .    "psxtime")
  121.          (common-lisp-time        .    "cltime")
  122.          (time-zone            .    "timezone")
  123.          (relational-database    .    "rdms")
  124.          (database-utilities    .    "dbutil")
  125.          (database-browse        .    "dbrowse")
  126.          (html-form            .    "htmlform")
  127.          (alist-table        .    "alistab")
  128.          (parameters        .    "paramlst")
  129.          (getopt-parameters        .    "getparam")
  130.          (read-command        .    "comparse")
  131.          (batch            .    "batch")
  132.          (glob            .    "glob")
  133.          (filename            .    glob)
  134.          (make-crc            .    "makcrc")
  135.          (fft            .    "fft")
  136.          (wt-tree            .    "wttree")
  137.          (string-search        .    "strsrch")
  138.          (root            .    "root")
  139.          (minimize            .    "minimize")
  140.          (precedence-parse        .    "prec")
  141.          (parse            .    precedence-parse)
  142.          (commutative-ring        .    "cring")
  143.          (self-set            .    "selfset")
  144.          (determinant        .    "determ")
  145.          (byte            .    "byte")
  146.          (tzfile            .    "tzfile")
  147.          (schmooz            .    "schmooz")
  148.          (net-clients        .    "nclients")
  149.          (db->html            .    "db2html")
  150.          (new-catalog        .    "mklibcat")
  151.          ))))
  152.     (display " " op)
  153.  
  154.     (let* ((req (in-vicinity (library-vicinity)
  155.                  (string-append "require" (scheme-file-suffix)))))
  156.       (write (cons '*SLIB-VERSION* (or (require:version req) *SLIB-VERSION*))
  157.          op))
  158.     (newline op)
  159.     (display ")" op) (newline op)
  160.  
  161.     (let ((load-if-exists
  162.        (lambda (path)
  163.          (cond ((not (file-exists? path))
  164.             (set! path (string-append path (scheme-file-suffix)))))
  165.          (cond ((file-exists? path)
  166.             (slib:load-source path))))))
  167.       ;;(load-if-exists (in-vicinity (implementation-vicinity) "mksitcat"))
  168.       (load-if-exists (in-vicinity (implementation-vicinity) "mkimpcat")))
  169.  
  170.     (let ((catcat
  171.        (lambda (vicinity name specificity)
  172.          (let ((path (in-vicinity vicinity name)))
  173.            (and (file-exists? path)
  174.             (call-with-input-file path
  175.               (lambda (ip)
  176.             (newline op)
  177.             (display "; " op)
  178.             (write path op)
  179.             (display " SLIB " op)
  180.             (display specificity op)
  181.             (display "-specific catalog additions" op)
  182.             (newline op) (newline op)
  183.             (do ((c (read-char ip) (read-char ip)))
  184.                 ((eof-object? c))
  185.               (write-char c op)))))))))
  186.       (catcat (library-vicinity) "sitecat" "site")
  187.       (catcat (implementation-vicinity) "implcat" "implementation")
  188.       (catcat (implementation-vicinity) "sitecat" "site"))
  189.     ))
  190.  
  191. (set! *catalog* #f)
  192.